<h1>Modifica i tuoi dati</h1>
<div id="modifica-profilo">
	<form action="index.php" method="post" ajax="no">
		<fieldset>
		<legend>Modifica dati profilo</legend>
		<div class="campo"><label for="old_password">Old password:</label><input type="password" name="old_password" /><div class="risposta"></div></div>
		<div class="campo"><label for="passowrd">Password:</label><input type="password" name="password" /><div class="risposta"></div></div>
		<div class="campo"><label for="conferma_password">Conferma password:</label><input type="password" name="conferma_password" /><div class="risposta"></div></div>
		<div class="campo"><label for="nome">Nome:</label><input type="text" name="nome" value="{$v_utente->getNome()}" /><div class="risposta"></div></div>
		<div class="campo"><label for="cognome">Cognome:</label><input type="text" name="cognome" value="{$v_utente->getCognome()}" /><div class="risposta"></div></div>
		<div class="campo"><label></label><input type="submit" value="modifica" /></div>
		<input type="hidden" name="c" value="CRegistrazione" />
		<input type="hidden" name="a" value="modificaProfilo" />
		</fieldset>
	</form>
</div>

<script type="text/javascript">
{literal}
var config = {
		nome : {
			regex: /^[a-zA-Z0-9_\-\.\,\s]{3,40}$/,
			message:'Nome non valido!'
		},
		password : {
			regex: /^[a-zA-Z0-9_\-\.]{6,40}$/,
			message:'Password errata!'
		},
		old_password: {
			message:'Password errata!',
			regex: /^[a-zA-Z0-9_\-\.]{6,40}$/
		},
		conferma_password:{
			message:'Password errata!',
			regex: /^[a-zA-Z0-9_\-\.]{6,40}$/
		},
		cognome:{
			message:'Cognome non valido',
			regex: /^[a-zA-Z0-9_\-\.\,\s]{3,40}$/
		}
}
{/literal}

var modificaProfilo = new FormControl('#modifica-profilo form',config,true);

$('#modifica-profilo input[type="submit"]').button();

</script>